package com.tencent.stat.event;

import android.content.Context;
import com.tencent.stat.NetworkManager;
import com.tencent.stat.StatAppMonitor;
import com.tencent.stat.StatSpecifyReportedInfo;
import com.tencent.stat.common.StatCommonHelper;
import com.tencent.stat.common.Util;
import org.json.JSONObject;

public class g extends e
{
  private static String m = null;
  private static String n = null;
  private StatAppMonitor a = null;

  public g(Context paramContext, int paramInt, StatAppMonitor paramStatAppMonitor, StatSpecifyReportedInfo paramStatSpecifyReportedInfo)
  {
    super(paramContext, paramInt, paramStatSpecifyReportedInfo);
    this.a = paramStatAppMonitor.clone();
  }

  public EventType a()
  {
    return EventType.MONITOR_STAT;
  }

  public boolean a(JSONObject paramJSONObject)
  {
    if (this.a == null)
      return false;
    paramJSONObject.put("na", this.a.getInterfaceName());
    paramJSONObject.put("rq", this.a.getReqSize());
    paramJSONObject.put("rp", this.a.getRespSize());
    paramJSONObject.put("rt", this.a.getResultType());
    paramJSONObject.put("tm", this.a.getMillisecondsConsume());
    paramJSONObject.put("rc", this.a.getReturnCode());
    paramJSONObject.put("sp", this.a.getSampling());
    if (n == null)
      n = StatCommonHelper.getAppVersion(this.l);
    Util.jsonPut(paramJSONObject, "av", n);
    if (m == null)
      m = StatCommonHelper.getSimOperator(this.l);
    Util.jsonPut(paramJSONObject, "op", m);
    paramJSONObject.put("cn", NetworkManager.getInstance(this.l).getCurNetwrokName());
    return true;
  }
}